<%@page import="cn.util.Const"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>
<html lang="zh">
<head>
    <title>宠物用品管理系统</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon" href="<%=Const.ROOT %>assets/images/favicon.png"/>
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/font-awesome.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/owl.carousel.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/animate.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/jquery-ui.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/slick.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/chosen.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/pe-icon-7-stroke.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/magnific-popup.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/lightbox.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/js/fancybox/source/jquery.fancybox.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/jquery.scrollbar.min.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/mobile-menu.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/fonts/flaticon/flaticon.css">
    <link rel="stylesheet" href="<%=Const.ROOT %>assets/css/style.css">
</head>
<body class="productsgrid-page">
<%@include file="inc/header.jsp" %>
<div class="site-content">
    <main class="site-main  main-container no-sidebar">
        <div class="container">
            <div class="breadcrumb-trail breadcrumbs">
                <ul class="trail-items breadcrumb">
                    <li class="trail-item trail-begin">
                        <a href="">
								<span>
									首页
								</span>
                        </a>
                    </li>
                    <li class="trail-item trail-end active">
							<span>
								订单支付
							</span>
                    </li>
                </ul>
            </div>
            <div class="row">
                <div class="main-content-cart main-content col-sm-12">
                    <h3 class="custom_blog_title">
                       订单支付
                    </h3>
                    <div class="page-main-content" style="text-align:center">
                        <div class="shoppingcart-content">
                            <form action="shoppingcart.html" class="cart-form">
                                <img src="<%=Const.ROOT%>images/z.jpg"/>
                                <div class="order-total">
									<span class="title">
										总价格:
									</span>
                                         <span class="total-price">
										￥${param.total }
										</span>
                                 </div>
                            </form>
                            <div class="control-cart" style="text-align:center">
                                <a class="button btn-continue-shopping" href="javascript:history.go(-1)">
                                    返回
                                </a>
                                <a class="button btn-cart-to-checkout" href="<%=Const.ROOT %>orders?action=add">
                                    支付
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
</div>
<%@include file="inc/footer.jsp" %>
<script src="<%=Const.ROOT %>assets/js/jquery-1.12.4.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery.plugin-countdown.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery-countdown.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/bootstrap.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/owl.carousel.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/magnific-popup.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/isotope.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery.scrollbar.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery-ui.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/mobile-menu.js"></script>
<script src="<%=Const.ROOT %>assets/js/chosen.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/slick.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery.elevateZoom.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery.actual.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/fancybox/source/jquery.fancybox.js"></script>
<script src="<%=Const.ROOT %>assets/js/lightbox.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/owl.thumbs.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/jquery.scrollbar.min.js"></script>
<script src="<%=Const.ROOT %>assets/js/frontend-plugin.js"></script> 
<script>
function addCart(){
	var quantity=$("#quantity").val();
	$.getJSON("<%=Const.ROOT %>carts",{"action":"add","quantity":quantity,"gid":'${goods.id}'},function(data){
		console.log(data);
		if(data.code==200){
			alert("添加成功!");
		}
	});
}	
function updateCarts(cid,val){
	$.getJSON("<%=Const.ROOT %>carts",{"action":"update","quantity":val,"id":cid},function(data){
		if(data.code==200){
			location.reload();
		}
	});
}
function del(id){
	if(confirm("是否删除?")){
		$.getJSON("<%=Const.ROOT %>carts",{"action":"delete","id":id},function(data){
			if(data.code==200){
				location.reload();
			}
		});
	}
}
</script>
</body>
</html>